<?php
function generate_red_order_no($user_id)
{
    return 'RO' . date('mdHi') . rand_number(0, 99) . str_pad(rand(0, ($user_id + date('s')) % 60), 3, 0, STR_PAD_LEFT);
}

function generation_withdraw_order_no($user_id)
{
    return 'WD' . date('mdHi') . rand_number(0, 99) . str_pad(rand(0, ($user_id + date('s')) % 60), 3, 0, STR_PAD_LEFT);
}

function generate_red_unique($user_id)
{
    return 'RD' . date('mdHi') . rand_number(0, 99) . str_pad(rand(0, ($user_id + date('s')) % 60), 3, 0, STR_PAD_LEFT);
}
